<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>project</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="./css/mui.min.css">
		<style>
			html,body {
				background-color: #efeff4;
			}
			.title{
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
			 .oa-contact-cell.mui-table .mui-table-cell {
				padding: 11px 0;
				vertical-align: middle;
			}
			
			.oa-contact-cell {
				position: relative;
				margin: -11px 0;
			}
	
			.oa-contact-avatar {
				width: 75px;
			}
			.oa-contact-avatar img {
				border-radius: 50%;
			}
			.oa-contact-content {
				width: 100%;
			}
			.oa-contact-name {
				margin-right: 20px;
			}
			.oa-contact-name, oa-contact-position {
				float: left;
			}
			.mui-content .title{
				font-size: 16px;
			}
			.mui-table-view-cell{
				font-size: 12px;
			}
		</style>
	</head>

	<body>
		<div class="mui-content">
			<!--<div class="title">
				布局：
			</div>
			<ul class="mui-table-view">
				 <li class="mui-table-view-cell">
				 	Fulid、Flex、Responsive
				 </li>
		         <li class="mui-table-view-cell">使用时间：2年</li>
		         <li class="mui-table-view-cell">掌握程度：非常熟悉</li>
			</ul>
			<div class="title">
				3规范:
			</div>
			<ul class="mui-table-view">
				 <li class="mui-table-view-cell">
				 	HTML4,HTML5,ES5,ES6,CommonJS,CMD,AMD
				 </li>
		         <li class="mui-table-view-cell">使用时间：1年</li>
		         <li class="mui-table-view-cell">掌握程度：熟悉</li>
			</ul>
			<div class="title">
				框架：
			</div>
			<ul class="mui-table-view">
				 <li class="mui-table-view-cell">
				 	Jquery,Zepto,AngularJS,ReactJS,VueJS等
				 </li>
		         <li class="mui-table-view-cell">使用时间：1年</li>
		         <li class="mui-table-view-cell">掌握程度：熟悉</li>
			</ul>-->
		</div>
	</body>
	<script src="./js/mui.min.js"></script>
	<script>
		mui.init({
			swipeBack:true //启用右滑关闭功能
		});
		var wrap = document.getElementsByClassName("mui-content")[0];
		console.log(wrap);
		mui.ajax('./mock/skill.json',{
			data:{
//				username:'username',
//				password:'password'
			},
			dataType:'json',//服务器返回json格式数据
			type:'get',//HTTP请求类型
			timeout:10000,//超时时间设置为10秒；
			headers:{'Content-Type':'application/json'},	              
			success:function(data){
				//服务器返回响应，根据响应结果，分析是否登录成功；
				//console.log(data[1]);
				for(var i=0;i<data.length;i++){
					wrap.innerHTML += '\
						<div class="title">\
							'+data[i].category+'\
						</div>\
						<ul class="mui-table-view">\
							 <li class="mui-table-view-cell">\
							 	'+data[i].name+'\
							 </li>\
					         <li class="mui-table-view-cell">使用时间：'+data[i].time+'</li>\
					         <li class="mui-table-view-cell">掌握程度：'+data[i].level+'</li>\
						</ul>\
					';
				}
			},
			error:function(xhr,type,errorThrown){
				//异常处理；
				console.log(type);
			}
		});
	</script>
</html>